package com.atgm.mall.gmmallauth.exception;

import com.atgm.common.exception.MemberException;
import com.atgm.common.utils.R;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class ExceptionHandler {

    @ResponseBody
    @org.springframework.web.bind.annotation.ExceptionHandler(value = MemberException.class)
    public R handlerMemnberException(MemberException e) {
        return R.error(e.getCode(), e.getMsg());
    }

}
